import java.util.ArrayList;
import java.util.List;

public class Arquivo {
	private List<String> hosts;
	private Boolean status;
	
	public Arquivo()
	{
		this.hosts = new ArrayList<String>();
		this.status = false;
	}

	public void addHost(String host)
	{
		if (!hosts.contains(host))
			hosts.add(host);
	}
	
	public Boolean temHost(String host)
	{
		return hosts.contains(host);
	}
	
	public List<String> getHosts()
	{
		return hosts;
	}
	
	public void apagaHost(String host)
	{
		hosts.remove(host);
	}
	
	public Boolean contemHosts()
	{
		return !hosts.isEmpty();
	}

	public Boolean getStatus() {
		return status;
	}
	
	public Boolean bloqueia() {
		if (!status)
			return false;
		
		status = false;
		return true;
	}
	
	public void desbloqueia() {
		status = true;
	}
}
